COMP = gcc
CC = $(COMP) -g
LD = $(COMP)
C_FLAGS  =  --std=c99
ROOT_DIR = .

EXECUTABLE = station_keeping
EXECUTABLE_OBJECTS =  sk_compute_trans.o sk_gui.o sk_polygon.o station_keeping.o sk_util.o sk_track_object.o
TARGET=exe
EXTRA_OBJECTS =
DEPENDENT_LIBS = -lcv -lhighgui

INCLUDE = -I/usr/local/include/opencv \
		  -I$(ROOT_DIR)/Includes

		
all: $(EXECUTABLE)

$(EXECUTABLE): $(EXECUTABLE_OBJECTS) 
	$(LD) $(LD_FLAGS) $(LIB_PATH) $(DEPENDENT_LIBS) -o $(EXECUTABLE) $(EXECUTABLE_OBJECTS) $(EXTRA_OBJECTS)
	@if test -d $(TARGET); then echo; else mkdir $(TARGET); fi 
	@mv $@ $(TARGET)
	
.c.o:
	$(CC) $(C_FLAGS) $(INCLUDE) -c $<


depend:
	@echo -n "Making dependancies...."
	@makedepend *.c

clean:
	@rm -f $(EXECUTABLE_OBJECTS) 
	@rm -f core `find . -type f -name 'core' -print` 
	@if test $(TARGET); then rm -rvf $(TARGET); fi 

